const mongoose = require("mongoose");

//定义了表结构!!!
const userSchema = mongoose.Schema({
    name: String,
    password:{
        type:String,
        select:false //控制当前这个字段是否需要被投影
    },
    avatar:String
})

//生成操作文档的工具
const userModel = mongoose.model("user",userSchema)
module.exports = userModel